import java.awt.*;
import javax.swing.*;

class myJPanel extends JPanel
{
  Sim2dSymbolTable sym;

  public myJPanel(Sim2dSymbolTable insym) {
	  sym = insym;
  }

  public void paintComponent(Graphics g) {
     super.paintComponent(g);

	  for (Sim2dDataType symbol : sym) {
		  if (symbol instanceof Sim2dObject) {
			  Sim2dObject objsymbol = (Sim2dObject)symbol;
			  Sim2dBool visible = (Sim2dBool)objsymbol.getField("visible");
			  if (visible.var) {
	   		  Sim2dFloat x = (Sim2dFloat)objsymbol.getField("x");
	   		  Sim2dFloat y = (Sim2dFloat)objsymbol.getField("y");
	   	     g.fillOval((int)(x.var), (int)(y.var), 3, 3);
			  }
		  }
	  }
  }
}
